@echo off
echo ====================================
echo DTSEToolBox 启动脚本
echo ====================================
echo.

echo [1] 检查 Node.js...
where node >nul 2>nul
if %errorlevel% neq 0 (
    echo [错误] 未找到 Node.js，请先安装 Node.js
    pause
    exit /b 1
)
node --version

echo [2] 检查依赖...
if not exist "node_modules\" (
    echo [提示] 正在安装依赖...
    call npm install
    if %errorlevel% neq 0 (
        echo [错误] 依赖安装失败
        pause
        exit /b 1
    )
)

echo.
echo [3] 启动应用...
echo [提示] 应用将在 http://localhost:3000 启动
echo [提示] 按 Ctrl+C 停止服务
echo.

start http://localhost:3000
npm run dev

pause


